package com.andon.microcellsimulator.http.response;

import com.andon.microcellsimulator.common.util.JsonUtil;
import com.google.gson.JsonElement;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;

/**
 * author: baiwenlong
 * created on: 2017/12/4 下午1:40
 * description: 与IOT通信第一步bean文件
 */
public abstract class ResponseStringCallback extends StringCallback {

    @Override
    public void onSuccess(Response<String> response) {
        BaseResponse baseResponse = JsonUtil.toObj(response.body(), BaseResponse.class);
        if (baseResponse != null) {
//            onSuccessModel(baseResponse.getReturnValue());
        }
    }

    public abstract void onSuccessModel(JsonElement jsonElement);
}
